package com.umpay.feign.hystrix;

import com.umpay.dto.UMFResponse;
import com.umpay.dto.UMFResponse.Message;
import com.umpay.dto.consumeBusi.req.ConsumeOrderQueryBusiReq;
import com.umpay.dto.consumeBusi.res.consumeOrderQuery.ConsumeOrderQueryBusiRes;
import com.umpay.dto.merBusi.req.bindcard.AgreementConfirmBusiReq;
import com.umpay.dto.merBusi.req.bindcard.AgreementOrderBusiReq;
import com.umpay.dto.merBusi.req.consume.*;
import com.umpay.dto.merBusi.req.ebankpay.EbankPayNotifyBusiReq;
import com.umpay.dto.merBusi.req.ebankpay.EbankPayOrderBusiReq;
import com.umpay.dto.merBusi.req.payment.AgreementPayBusiReq;
import com.umpay.dto.merBusi.req.payment.AppPayOrderBusiReq;
import com.umpay.dto.merBusi.req.payment.MPOSBusiReq;
import com.umpay.dto.merBusi.req.payment.PaymentCodePayBusiReq;
import com.umpay.dto.merBusi.req.payment.WechatPublicPlatformReq;
import com.umpay.dto.merBusi.req.query.BalanceQueryBusiReq;
import com.umpay.dto.merBusi.req.quickpayment.QuickPaymentConfirmBusiReq;
import com.umpay.dto.merBusi.req.quickpayment.QuickPaymentOrderBusiReq;
import com.umpay.dto.merBusi.req.quickpayment.QuickPaymentVerifyCodeBusiReq;
import com.umpay.dto.merBusi.req.recharge.RechargeDirectBusiReq;
import com.umpay.dto.merBusi.req.recharge.RechargeDirectCfmBusiReq;
import com.umpay.dto.merBusi.req.recharge.RechargeSearchBusiReq;
import com.umpay.dto.merBusi.req.recharge.RechargeWyOrderReq;
import com.umpay.dto.merBusi.req.split.TransSplitBusiReq;
import com.umpay.dto.merBusi.req.split.TransSplitQueryBusiReq;
import com.umpay.dto.merBusi.res.bindcard.AgreementConfirmBusiRes;
import com.umpay.dto.merBusi.res.bindcard.AgreementOrderBusiRes;
import com.umpay.dto.merBusi.res.consume.*;
import com.umpay.dto.merBusi.res.ebankpay.EbankPayNotifyBusiRes;
import com.umpay.dto.merBusi.res.ebankpay.EbankPayOrderBusiRes;
import com.umpay.dto.merBusi.res.payment.AgreementPayBusiRes;
import com.umpay.dto.merBusi.res.payment.AppPayOrderBusiRes;
import com.umpay.dto.merBusi.res.payment.MPOSBusiRes;
import com.umpay.dto.merBusi.res.payment.PaymentCodePayBusiRes;
import com.umpay.dto.merBusi.res.payment.WechatPublicPlatformRes;
import com.umpay.dto.merBusi.res.query.BalanceQueryBusiRes;
import com.umpay.dto.merBusi.res.quickpayment.QuickPaymentConfirmBusiRes;
import com.umpay.dto.merBusi.res.quickpayment.QuickPaymentOrderBusiRes;
import com.umpay.dto.merBusi.res.quickpayment.QuickPaymentVerifyCodeBusiRes;
import com.umpay.dto.merBusi.res.recharge.RechargeDirectBusiRes;
import com.umpay.dto.merBusi.res.recharge.RechargeDirectCfmBusiRes;
import com.umpay.dto.merBusi.res.recharge.RechargeSearchBusiRes;
import com.umpay.dto.merBusi.res.recharge.RechargeWyOrderRes;
import com.umpay.dto.merBusi.res.split.TransSplitBusiRes;
import com.umpay.feign.client.ConsumeBusiServerFeignClient;
import com.umpay.feign.factory.ConsumeBusiFeignClientWithFactory;
import feign.hystrix.FallbackFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author zhanglz
 * @ClassName: ConsumeBusiServerFeignClientHystrix
 * @Description:
 * @date 2018/9/11 14:48
 */
@Component
public class ConsumeBusiServerFeignClientHystrix implements FallbackFactory<ConsumeBusiServerFeignClient> {

    private static final Logger LOGGER = LoggerFactory.getLogger(ConsumeBusiServerFeignClientHystrix.class);

    @Override
    public ConsumeBusiServerFeignClient create(Throwable cause){
        LOGGER.info("fallback; reason was: {}", cause.getMessage());

        return new ConsumeBusiFeignClientWithFactory() {
            @Override
            public UMFResponse.Message<ConsumeFinishOrderBusiRes> finishOrder(ConsumeFinishOrderBusiReq consumeFinishOrderBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<RechargeWyOrderRes> rechargeWy(RechargeWyOrderReq rechargeWyOrderReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<RechargeDirectBusiRes> rechargeDirect(RechargeDirectBusiReq rechargeDirectOrderReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<RechargeDirectCfmBusiRes> rechargeDirectConfirm(RechargeDirectCfmBusiReq rechargeDirectCfmReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<RechargeSearchBusiRes> rechargeSearch(RechargeSearchBusiReq rechargeSearchBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<ConsumeBalanceBusiRes> merConsumeBalance(ConsumeBalanceBusiReq consumeBalanceBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<ConsumeDebitcardBusiRes> merConsumeDebitcard(ConsumeDebitcardBusiReq consumeDebitcardBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<ConsumeDebitcardConfirmBusiRes> merConsumeDebitcardConfirm(ConsumeDebitcardConfirmBusiReq consumeDebitcardConfirmBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<ConsumeNetBankBusiRes> merConsumeNetBank(ConsumeNetBankBusiReq consumeNetBankBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<ConsumeNetBankConfirmBusiRes> merConsumeNetBankConfirm(ConsumeNetBankConfirmBusiReq consumeNetBankConfirmBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<TransSplitBusiRes> transSplit(TransSplitBusiReq transSplitBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<TransSplitBusiRes> transSplitQuery(TransSplitQueryBusiReq transSplitQueryBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<BalanceQueryBusiRes> balanceQuery(BalanceQueryBusiReq balanceQueryBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<ConsumeQueryBusiRes> consumeQuery(Map<String, Object> requestMap) {
                return null;
            }

            @Override
            public UMFResponse.Message<ConsumeScancodeMainBusiRes> consumeScancodeMainBusiReq(ConsumeScancodeMainBusiReq consumeScancodeMainBusiRes) {
                return null;
            }

            @Override
            public UMFResponse.Message<ConsumeH5NotifyBusiRes> h5PayNotify(ConsumeH5NotifyBusiReq consumeH5NotifyBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<ConsumeGeneralOrderBusiRes> consumeGeneralOrder(ConsumeGeneralOrderBusiReq consumeGeneralOrderBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<ConsumeH5BusiRes> consumeH5Pay(ConsumeH5BusiReq consumeH5BusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<ConsumeFileUploadNotifyBusiRes> consumeFileUploadNotify(ConsumeFileUploadNotifyBusiReq consumeFileUploadNotifyBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<QuickPaymentConfirmBusiRes> quickPaymentConfirm(QuickPaymentConfirmBusiReq quickPaymentConfirmBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<QuickPaymentOrderBusiRes> quickPaymentOrder(QuickPaymentOrderBusiReq quickPaymentOrderBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<QuickPaymentVerifyCodeBusiRes> quickPaymentVerifyCode(QuickPaymentVerifyCodeBusiReq quickPaymentVerifyCodeBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<EbankPayOrderBusiRes> ebankPayOrder(EbankPayOrderBusiReq ebankPayBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<EbankPayNotifyBusiRes> ebankPayNotify(EbankPayNotifyBusiReq ebankPayNotifyBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<WechatPublicPlatformRes> wechatPlatformPay(WechatPublicPlatformReq wechatPublicPlatformReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<MPOSBusiRes> mposPay(MPOSBusiReq mposBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<PaymentCodePayBusiRes> paymentCodePay(PaymentCodePayBusiReq PaymentCodePayBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<AgreementOrderBusiRes> agreementOrder(AgreementOrderBusiReq AgreementOrderBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<AgreementConfirmBusiRes> agreementConfirm(AgreementConfirmBusiReq AgreementConfirmBusiReq) {
                return null;
            }

            @Override
            public UMFResponse.Message<AgreementPayBusiRes> agreementPay(AgreementPayBusiReq AgreementPayBusiReq) {
                return null;
            }

			@Override
			public Message<AppPayOrderBusiRes> appPayBackEndOrder(
					AppPayOrderBusiReq appPayOrderBusiReq) {
				/**   
				* @Description: TODO(用一句话描述该文件做什么) 
				* @author zhanglz   
				* @date 2018年10月12日 上午10:46:14 
				*/
				return null;
			}

			@Override
			public Message<ConsumeVirtualPaymentBusiRes> consumeVirtualPayment(
			        ConsumeVirtualPaymentBusiReq virtualPaymentBusiReq) {
				// TODO Auto-generated method stub
				return null;
			}
			
			@Override
            public UMFResponse.Message<ConsumeOrderQueryBusiRes> consumeOrderQuery(ConsumeOrderQueryBusiReq consumeOrderQueryBusiReq) {
                return null;
            }
            
        };
    }
}
